import request from '@/utils/request'

export function getList(pageNum, pageSize, className) {
    return request({
        url: '/web/classInfo/getPage',
        method: 'get',
        params: {pageNum, pageSize, className}
    })
}

// export function getList(data) {
//     return request({
//         url: '/web/classInfo/getPage',
//         method: 'get',
//         data
//     })
// }

export function add(data) {
    return request({
        url: 'web/classInfo/add',
        method: 'post',
        data
    })
}

export function del(id) {
    return request({
        url: 'web/classInfo/del/' + id,
        method: 'DELETE'
    })
}

export function update(data) {
    return request({
        url: 'web/classInfo/update',
        method: 'post',
        data
    })
}

export function getEdi(id) {
    return request({
        url: 'web/classInfo/get/' + id,
        method: 'get'
    })
}

export function getClass(schoolId) {
    return request({
        url: 'web/classInfo/getClassList',
        method: 'get',
        params: { schoolId }
    })
}